home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byt87ibm.arc / DRUMMOND.ARC / T8255.PAS < prev   
Pascal/Delphi Source File  |  1987-09-25  |  640b  |  25 lines

  1. program test_8255;
  2. const
  3.      PORT_A      = $388;
  4.      PORT_B      = $389;
  5.      PORT_C      = $38A;
  6.      CONTROL_LOC = $38B;
  7. var
  8.    i,j,k:  integer;
  9. begin
  10.      port[CONTROL_LOC] := $84;
  11.      repeat
  12.            begin
  13.                 for j := 0 to maxint do
  14.                 begin
  15.                      port[PORT_A] := lo(j);
  16.                      port[PORT_B] := hi(j);
  17.                      i := port[PORT_A];
  18.                      k := port[PORT_B];
  19.                      if (hi(j) <> k) or (lo(j) <> i) then writeln('help'^G);
  20.                 end;
  21.            end;
  22.            writeln(k:6,i:6);
  23.      until false;
  24. end.